#define _CRT_SECURE_NO_WARNINGS
#include"string.h"

namespace shen
{
	string::string()
		:_str(new char[1] {'\0'})
		, _size(0)
		, _capacity(0)
	{}

	string::string(const char* s)
		:_size(strlen(s))
	{
		_capacity = _size;
		_str = new char[_size + 1];
		strcpy(_str, s);
	}

	string::~string()
	{
		delete[] _str;
		_str = nullptr;
		_size = 0;
		_capacity = 0;
	}
}